/* eslint-disable */
import React from "react";
import {Link} from "react-router-dom";
import logo from "../../assets/images/4-logo_2@3x.png";
import touxiang from "../../assets/images/touxiang.png";
import "./../../view/Public/Head.less";


class Head extends React.Component {
	constructor(props) {
		//创建组件时必须执行的方法，构造方法
		super();
		// console.log(props);
		// this.name = "tom"
		this.state = {
			Account : "",
			Password: "",
			current : "mail",
		};
	}

	componentWillMount() {
		let UserInfo = sessionStorage.getItem("UserInfo");
		// console.log('没有登陆',UserInfo)
		// if (!UserInfo) {
		// 	this.props.history.push('/login')
		// 	console.log('没有登陆',UserInfo)
		// }
	}

	handleSubmit = (e) => {
		e.preventDefault();
		// console.log(this.state);
		let {Account, Password} = this.state;
		if (!Account && !Password) {
			message.info("账号密码错误");
		}

	};
	AccountInput = (type, e) => {
		if (type == "Password") {
			var data = {
				Password: e.target.value,
			};
		} else {
			var data = {
				Account: e.target.value,
			};
		}
		this.setState(data);

	};

	handleClick = e => {
		console.log("click ", e);
		this.setState({current: e.key});
	};

	render() {
		const {current} = this.state;
		return (
			<div className="Head">
				<div className="w-1200  h-100 d-flex align-items-center justify-content-between">
					<div className="logo">
						<Link to="/main"><img src={logo} height="50" alt=""/></Link>
					</div>
					<div className="menu-right d-flex justify-content-between">
						<div className="w-75  d-flex align-items-center justify-content-start">
							<div className="pr-100px text-999 fw"><Link to="/index">库</Link></div>
							<div className="pr-100px text-999 fw"><Link to="/main">定制化配方</Link></div>
							<div className="pr-100px text-999 fw"><Link to="/">配方管理</Link></div>
						</div>
						<div className="w-25 d-flex align-items-center justify-content-around ">
							<div>用户名</div>
							<div><a href="">注销</a></div>
							<div><img src={touxiang} height="40" width="40" alt=""/></div>
						</div>
					</div>
				</div>
			</div>
		);
	}


}

export default Head;
